#!/usr/bin/python3

def fibonacci(n):
    a, b = 0, 1
    while a < n:
        yield a
        a, b = b, a + b

for x in fibonacci(8):
    print(x)

